package com.client.netty;

import com.rpc.handler.RpcClientHandler;
import io.netty.channel.Channel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import java.util.HashMap;
import java.util.Map;

@Component
public class NettyClient  {
    @Autowired
    private RpcClientHandler nettyClientHandler;
    public static Map<String, Channel> maps = new HashMap<>();
    @PostConstruct
    public void startClient(){
        nettyClientHandler.startClient("127.0.0.1",5181,maps);
//        nettyClientHandler.startClient("127.0.0.1",5182,maps);
    }
}
